package com.turing.draw.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.turing.draw.model.domain.OcrPageTask;
import com.turing.draw.model.vo.in.OcrResultVo;


/**
 * @Description $!{table.comment} 服务类接口
 * @Author livin
 * @Date 2021-11-04
 */
public interface OcrPageTaskService extends IService<OcrPageTask> {

    Integer getTaskStatusById( String ocrPageTaskSn );

    OcrPageTask getOcrPageTask();

    OcrPageTask getTaskById( String ocrPageTaskSn );

    boolean lockOcrPageTask(String ocrPageTaskSn,String domain);

    boolean saveJSONResult(String JSONUrl, String ocrPageTaskSn);

    boolean saveFileImage(String taskSn,Integer pageNo,String imageUrl);

    Integer countFilesByTaskSnAndStatus(String parentTaskSn,Integer status);

    int removeTasksByTaskSn(String taskSn);

    boolean unLockOcrPageTask(String ocrPageTaskSn);

    boolean tasksFailed(String parentTaskSn);

    int deleteByParentTaskSn(String parentTaskSn);

    int deleteByOcrPageTaskSn(String ocrPageTaskSn);

    void checkAndDivisionTemplate(String taskSn, String templateId);

}
